// @ts-ignore
import { Avatar } from 'antd';
// @ts-ignore
import moment from 'moment';
import styles from './knowledgeListContent.less';
import {getKeywordStr} from "@/utils/func";
// @ts-ignore
const KnowledgeListContent= ({
    data
}:{
    data?:any
}) => (
    <div className={styles.listContent}>
        <div className={styles.description} dangerouslySetInnerHTML={{__html:data.baseInfo}}></div>
        <div className={styles.keyword}>
            <em>
                关键词：{getKeywordStr({value:data.keywords})}
            </em>
        </div>
        <div className={styles.extra}>
            {data.onwer &&  <Avatar src={data.avatar} size="small" />}
            <a href={data.href}>{data.onwer}</a>
            <em>{moment(data.updateTime).format('YYYY-MM-DD HH:mm')}</em>
        </div>
    </div>
);

export default KnowledgeListContent;
